import { createApp } from 'vue'
import App from './App.vue'

import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import router from './router/router'
import store from './store/store'
import './icons'
import './assets/scss/aui.scss'

import customComponents from "./components"
import cloneDeep from "lodash/cloneDeep";


// // 保存整站vuex本地储存初始状态
window.SITE_CONFIG['storeState'] = cloneDeep(store.state)

const app = createApp(App)
app.use(router).use(store)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(ElementPlus, { locale: zhCn, size: 'large', zIndex: 3000 })
app.use(customComponents)
app.mount('#app')
